import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 导入适配模块
import 'amfe-flexible'

// 导入element组件库
import './common/element/index'

// 导入base.css文件
import './assets/base.css'


Vue.config.productionTip = false


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')


// 设置根元素字体大小
const initFontSize = () => {
    let width = window.innerWidth;
    let maxWidth = 750;
    if(width > maxWidth) {
        let html = document.documentElement;
        html.style.fontSize = "75px";
    }
}
initFontSize();
// 监听屏幕尺寸的变化
window.addEventListener('resize', initFontSize);
window.addEventListener('orientationchange',()=> {
    // console.log("设备摇一摇");
    initFontSize();
})

// 设置网站标题
document.title = "在线考试";